package com.sunfeng.netty.atguigu2.bio;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;
import java.nio.charset.StandardCharsets;

/**
 * @Author : 清风冷影
 * @Description:
 * @Date : 2021/8/20  10:51
 */
public class BIOClient {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket();

        socket.connect(new InetSocketAddress("127.0.0.1",9999));

        socket.getOutputStream().write("sunfeng".getBytes(StandardCharsets.UTF_8));
        socket.close();
    }
}
